#include <stdio.h>
int slove(int *s,int n);

void main(void){
	int n,j;
	scanf("%d",&n);
	int s[n*n];
	getchar();
	for (j=0;j<n*n;j++){
		scanf("%d",&s[j]);
	}
	printf("%d",slove(s,n));
}

int slove(int *p,int n){
	int *s=p+(n-1);
	int sum=0,j=0;
	for (j=0;j<n/2;j++){
		sum+=*p+*s;
		p+=n+1;
		s+=n-1;
	}
	if (n%2!=0){
		sum+=*p;
		for (j=0;j<n/2;j++){
			p+=n+1;
			s+=n-1;
			sum+=*p+*s;
		}
	}else{
		p-=n+1;
		s-=n-1;
		for (j=0;j<n/2;j++){
			p+=n+1;
			s+=n-1;
			sum+=*p+*s;
		}
	}
	return sum;
}
